package com.obaamilos.accesscontrol;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.BorderLayout;
import javax.swing.JSplitPane;
import java.awt.GridLayout;
import javax.swing.JTextField;
import java.awt.Panel;
import javax.swing.SwingConstants;
import javax.swing.JPanel;
import javax.swing.border.BevelBorder;
import javax.swing.JRadioButton;
import javax.swing.JTextArea;
import javax.swing.JComboBox;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Window.Type;
import javax.swing.DropMode;
import javax.swing.JScrollPane;

public class testegui {

	private JFrame frame;
	private JTextField txtQtdAgentesAC;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					testegui window = new testegui();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public testegui() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setResizable(false);
		frame.setType(Type.UTILITY);
		frame.setBounds(100, 100, 550, 400);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		
		JLabel lblNewLabel = new JLabel("Agentes AC:");
		lblNewLabel.setHorizontalAlignment(SwingConstants.RIGHT);
		lblNewLabel.setBounds(0, 14, 97, 14);
		frame.getContentPane().add(lblNewLabel);
		
		txtQtdAgentesAC = new JTextField();
		txtQtdAgentesAC.setBounds(107, 11, 62, 20);
		frame.getContentPane().add(txtQtdAgentesAC);
		txtQtdAgentesAC.setColumns(10);
		
		JLabel lblOperao = new JLabel("Opera\u00E7\u00E3o:");
		lblOperao.setHorizontalAlignment(SwingConstants.RIGHT);
		lblOperao.setBounds(35, 48, 62, 14);
		frame.getContentPane().add(lblOperao);
		
		JPanel panel = new JPanel();
		panel.setBounds(107, 37, 240, 36);
		frame.getContentPane().add(panel);
		panel.setLayout(null);
		
		JRadioButton rdbtnLogin = new JRadioButton("Login");
		rdbtnLogin.setBounds(6, 7, 62, 23);
		panel.add(rdbtnLogin);
		
		JRadioButton rdbtnAcesso = new JRadioButton("Acesso");
		rdbtnAcesso.setBounds(80, 7, 70, 22);
		panel.add(rdbtnAcesso);
		
		JRadioButton rdbtnLogout = new JRadioButton("Logout");
		rdbtnLogout.setBounds(156, 7, 109, 23);
		panel.add(rdbtnLogout);
		
		JLabel lblMensagem = new JLabel("Mensagem:");
		lblMensagem.setHorizontalAlignment(SwingConstants.RIGHT);
		lblMensagem.setBounds(19, 86, 78, 14);
		frame.getContentPane().add(lblMensagem);
		
		JTextArea txtComando = new JTextArea();
		txtComando.setWrapStyleWord(true);
		txtComando.setLineWrap(true);
		txtComando.setBounds(107, 81, 425, 63);
		frame.getContentPane().add(txtComando);
		
		JComboBox cbxToken = new JComboBox();
		cbxToken.setBounds(107, 155, 297, 20);
		frame.getContentPane().add(cbxToken);
		
		JLabel lblToken = new JLabel("Token:");
		lblToken.setHorizontalAlignment(SwingConstants.RIGHT);
		lblToken.setBounds(0, 158, 97, 14);
		frame.getContentPane().add(lblToken);
		
		JLabel lblResposta = new JLabel("Resposta:");
		lblResposta.setHorizontalAlignment(SwingConstants.RIGHT);
		lblResposta.setBounds(19, 186, 78, 14);
		frame.getContentPane().add(lblResposta);
		
		JButton btnEnviar = new JButton("Enviar");
		btnEnviar.setBounds(454, 8, 78, 26);
		frame.getContentPane().add(btnEnviar);
		
		JButton btListar = new JButton("Listar");
		btListar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			}
		});
		btListar.setBounds(454, 42, 78, 26);
		frame.getContentPane().add(btListar);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(107, 187, 425, 177);
		frame.getContentPane().add(scrollPane);
		
		JTextArea txtResposta = new JTextArea();
		scrollPane.setViewportView(txtResposta);
		txtResposta.setDropMode(DropMode.ON);
		txtResposta.setText("1Exemplo de texto\r\n2Exemplo de texto\r\n3Exemplo de texto\r\n4Exemplo de texto\r\n5Exemplo de texto\r\n6Exemplo de texto\r\n7Exemplo de texto\r\n8Exemplo de texto\r\n9Exemplo de texto\r\n10Exemplo de texto\r\n11Exemplo de texto\r\n12Exemplo de texto\r\n13Exemplo de texto\r\n14Exemplo de texto\r\n15Exemplo de texto\r\n16Exemplo de texto\r\n17Exemplo de texto\r\n18Exemplo de texto\r\n19Exemplo de texto\r\n20Exemplo de texto\r\n");
	}
}
